package proxies.classes.activetransfers
{
	public class ActiveTransfersItem
	{
		
		public var id:String;
		public var name:String;
		public var status:String;
		public var percentDone:int;
		
		public function ActiveTransfersItem(rawData:Object)
		{
			id = rawData.id;
			name = rawData.name;
			status = rawData.status;
			percentDone = rawData.percent_done;			
		}
		
		/**
		 * Check if file has been completly downloaded
		 * 
		 * @return true if the file has been downloaded
		 */			
		public function isComplete():Boolean
		{
			return (percentDone == 100);
		}
		
		public function toString():String
		{
			return 'id='+id+' \nname='+name+' \nstatus='+status+' \npercent done='+percentDone;
		}
	}
}